/*package com.huarui.permission.inteceptor;

import java.util.Properties;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.Predicate;
import org.apache.struts2.StrutsStatics;
import org.ewaf.framework.cookie.CookieManager;

import com.huarui.permission.dataobject.Action;
import com.huarui.permission.dataobject.Permission;
import com.huarui.permission.service.PermissionService;
import com.huarui.user.model.CookieConstants;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class AnonymousUserInterceptor extends AbstractInterceptor {

	*//**
	 * 
	 *//*
	private static final long serialVersionUID = 1L;

	private PermissionService permissionService;
	
	private Properties  env;
	
	

	public Properties getEnv() {
		return env;
	}

	public void setEnv(Properties env) {
		this.env = env;
	}

	public PermissionService getPermissionService() {
		return permissionService;
	}

	public void setPermissionService(PermissionService permissionService) {
		this.permissionService = permissionService;
	}

	@Override
	public String intercept(ActionInvocation invocation) throws Exception {

		HttpServletRequest request = (HttpServletRequest) invocation
				.getInvocationContext().get(StrutsStatics.HTTP_REQUEST);

		CookieManager cookie = new CookieManager(request);

		String logined = cookie.getValue(CookieConstants.COOKIE_PERM,
				CookieConstants.LOGINED);

		boolean isLogined = Boolean.valueOf(logined);

		if (isLogined==false) {
			
			final String action = invocation.getProxy().getActionName();
			final String method = invocation.getProxy().getMethod();
			

			
			Action a = permissionService.findAction(action,method);
			
			if(a==null){
				return invocation.invoke();
			}
			
			return env.getProperty("anonymousUserHomeUrl", "http://www.uec3.com/");
		}

		return invocation.invoke();
	}

}
*/